//
//  GaoDeVC.m
//  first
//
//  Created by 毕小强 on 16/12/7.
//  Copyright © 2016年 毕小强. All rights reserved.
//

#import "GaoDeVC.h"
//#import <AMapSearchKit/AMapSearchKit.h>
//#import <AMapFoundationKit/AMapFoundationKit.h>
//#import <MAMapKit/MAMapKit.h>
#import <CoreLocation/CoreLocation.h>
@interface GaoDeVC ()//<AMapSearchDelegate,MAMapViewDelegate>
//@property (nonatomic,strong)MAMapView *mapView;
//@property (nonatomic,strong)AMapSearchAPI *search;
@end

@implementation GaoDeVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    //百度地图
    //self.mapView = [[MAMapView alloc]initWithFrame:CGRectMake(0, 64, self.view.bounds.size.width, self.view.bounds.size.height-64)];
//    self.mapView.delegate = self;
//    self.mapView.pausesLocationUpdatesAutomatically = NO;
//    self.mapView.allowsBackgroundLocationUpdates = YES;
    //[self.view addSubview:_mapView];
    
//    self.mapView.showsUserLocation = YES;                                    //显示用户位置
//    [self.mapView setUserTrackingMode:MAUserTrackingModeFollow animated:YES];//设置地图跟随位置移动
//    
//    self.search = [[AMapSearchAPI alloc] init];                              //地理编码
//    self.search.delegate = self;
}
//-(void)mapView:(MAMapView *)mapView didUpdateUserLocation:(MAUserLocation *)userLocation updatingLocation:(BOOL)updatingLocation{
//    AMapReGeocodeSearchRequest *regeo = [[AMapReGeocodeSearchRequest alloc] init];
//    
//    regeo.location                    = [AMapGeoPoint locationWithLatitude:userLocation.coordinate.latitude longitude:userLocation.coordinate.longitude];
//    regeo.requireExtension            = YES;
//    [self.search AMapReGoecodeSearch:regeo];
//}
//-(void)mapView:(MAMapView *)mapView didFailToLocateUserWithError:(NSError *)error{
//    
//}
//-(void)onReGeocodeSearchDone:(AMapReGeocodeSearchRequest *)request response:(AMapReGeocodeSearchResponse *)response{
//    if (response.regeocode != nil) {
//        NSString *str = [NSString stringWithFormat:@"%@%@%@%@%@%@",response.regeocode.addressComponent.province,response.regeocode.addressComponent.city,response.regeocode.addressComponent.district,response.regeocode.addressComponent.township,response.regeocode.addressComponent.streetNumber.street,response.regeocode.addressComponent.streetNumber.number];
//        NSLog(@"%@",str);
//    }
//}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
